import React, { Component } from 'react'
import QCevents from "../util/events"
class Son extends Component {
 state = {
     age:"20"
 }
 fn(){
     this.props.fn(this.state.age)
 }
 sendDau(){
    QCevents.emit("btos","姐姐组件给弟弟组件得数据")
 }
  render() {
    console.log(this.props,"111111")
    return (
    
      <div>
          <button onClick={this.fn.bind(this)}>点击我给父组件船只</button>
          <span>{this.props.send}</span>
          <button onClick={this.sendDau.bind(this)}>我要给女儿组件发送值</button>
      </div>
    )
  }
}

export default Son